#include<bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin>>s;
  int sum=1;
  bool flag=false;
  for(int i=0;i<s.length();i++){
    if(s[i]=='-')sum-=1;
    if(s[i]=='*')sum*=2;
    if(sum>=2025)flag=true;
  }
  if(flag)cout<<"YES"<<endl;
  else cout<<"NO"<<endl;

  return 0;
}